#pragma once

class Player;
class Net 
{
	Player& m_owner;
	SessionId m_snId;
	su::Timer m_offlineTimer;
	su::Timer m_waitReleaseTimer; 

public:
	LoginState m_state = LoginState::Logout;

public:
	Net(Player& player);
	~Net();

	const SessionId& SnId() { return m_snId; }
	void SetSnId(const SessionId& snid) {m_snId = snid;}
	void DelSession();
	void SetState(LoginState state);
	void OnClientDisCon();
	void SendToClient(uint32 cmd, const std::string& msg);
	void SetWaitRelease(bool enable);
};
